﻿@model RSSReader.WebClient.Models.UserAuthModel

<div style="height:100%;padding-top:30px;">
  <div style="display:inline-block;width:calc(50% - 5px);float:left;">
    <h2>Connexion</h2>

    @using (Html.BeginForm())
    {
      @Html.AntiForgeryToken()

      <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.ValidationMessageFor(model => model.UserLogin, "", new { @class = "text-danger" })
        <div class="form-group">
          @Html.LabelFor(model => model.UserLogin.UserName, htmlAttributes: new { @class = "control-label col-md-2" })
          <div class="col-md-10">
            @Html.EditorFor(model => model.UserLogin.UserName, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.UserLogin.UserName, "", new { @class = "text-danger" })
          </div>
        </div>

        <div class="form-group">
          @Html.LabelFor(model => model.UserLogin.Password, htmlAttributes: new { @class = "control-label col-md-2" })
          <div class="col-md-10">
            @Html.EditorFor(model => model.UserLogin.Password, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.UserLogin.Password, "", new { @class = "text-danger" })
          </div>
        </div>

        <div class="form-group">
          <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Login" class="btn btn-default" />
          </div>
        </div>
      </div>
    }
  </div>
  <div style="display:inline-block;width:calc(50% - 5px);float:left">
    <h2>Nouvel utilisateur</h2>

    @using (Html.BeginForm())
    {
      @Html.AntiForgeryToken()

      <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
          @Html.LabelFor(model => model.UserCreation.UserName, htmlAttributes: new { @class = "control-label col-md-2" })
          <div class="col-md-10">
            @Html.EditorFor(model => model.UserCreation.UserName, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.UserCreation.UserName, "", new { @class = "text-danger" })
          </div>
        </div>
        <div class="form-group">
          @Html.LabelFor(model => model.UserCreation.Email, htmlAttributes: new { @class = "control-label col-md-2" })
          <div class="col-md-10">
            @Html.EditorFor(model => model.UserCreation.Email, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.UserCreation.Email, "", new { @class = "text-danger" })
          </div>
        </div>

        <div class="form-group">
          @Html.LabelFor(model => model.UserCreation.Password, htmlAttributes: new { @class = "control-label col-md-2" })
          <div class="col-md-10">
            @Html.EditorFor(model => model.UserCreation.Password, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.UserCreation.Password, "", new { @class = "text-danger" })
          </div>
        </div>

        <div class="form-group">
          @Html.LabelFor(model => model.UserCreation.ConfirmPassword, htmlAttributes: new { @class = "control-label col-md-2" })
          <div class="col-md-10">
            @Html.EditorFor(model => model.UserCreation.ConfirmPassword, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.UserCreation.ConfirmPassword, "", new { @class = "text-danger" })
          </div>
        </div>

        <div class="form-group">
          <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Create" class="btn btn-default" />
          </div>
        </div>
      </div>
    }

  </div>
</div>